//main page,index and personal-center
let indexDataApi = 'Money/enter_coupon';
let getPersonalCenterApi = 'Money/wallet';
let maintainRepairApi = 'Money/feedback';
let getEquipmentApi='Scan/verify_port';
let getCodeActivityApi='Activity/enter_activity_h';//二维码活动参与的api
let getMapDetailApi='scan/map_list_more';//查询用户当前地图的充电桩数据
let getMapErrorApi='Scan/correct';//地图错误上报
let getSignDataApi='Activity/sign_find';//签到查询
let getGoSignApi='Activity/sign';//点击签到
let getSignRuleApi='Agreement/sign_agreement';//签到规则 
let signReceiveApi='Activity/sign_get_ticket';//签到里面底部列表的活动领取
let getSignPayApi='Activity/sign_pay_detail';//签到支付页面数据查询
let getSignCouponLookApi='Card/card_instruct';//签到支付页面劵查看
let submitCommunicationApi='Phone_Recharge/phoneList';//提交用户选择的通讯录数据到h5话费充值活动
let setPopupCheckboxApi='popup/index';//首页时间选择页面弹窗中复选框勾选取消调用的接口。
let getPasteApi='/Paste/index';//粘贴板。
let getUser_infoApi='Signin/user_info';//小程序获取图像和昵称
let getChargingApi='task/charging';//充电后续
let getBurstApi='Burst/index';//突发情况首页
let getBurstscanApi='Burst/scan';//突发情况首页扫码列表
let getBurstStartApi='Burst/start';//突发情况开启充电
let getAwardApi='/Award/click';//一折充电查询接口
let getAccountApi='/popup/account';//查询是否关注公众号
let signinApi = '/Signin/setup';//设置
//charg一折充电查询接口
let codeLoginApi = 'Signin/index';//首页登录接口
let countdownApi = 'Popup/countdown';//充电结束前调用的接口
let getLogin_replaceApi='Login/replace';//小程序获取图像和昵称
// #ifdef	MP-WEIXIN
let phoneAuthorizationApi='Login/get_applet_phone';//手机号授权接口
let loginOutApi='Login/wxAppletLogout';//退出登录
let commonPayApi='pay/pay_fee';
// #endif

// #ifdef	MP-ALIPAY
let phoneAuthorizationApi='Mobile/get_alipay_applet_phone';//手机号授权
let loginOutApi='Login/sign_out';//退出登录
let commonPayApi='pay/pay_fee'; // 支付宝支付
// #endif
let userAgreementApi='Agreement/statement';
let portListApi='Scan/get_community';
let portOpenApi='Scan/scan';
let getActivityApi='Scan/coupon';
let getFullStopModalApi='Agreement/charge_full_agreement';//时间选择页面充满即停点击弹起的弹窗中的文字数据
let startChargeApi='Scan/start';
let getCountdownApi='Scan/countdown';
let endChargingApi='Scan/stop_charge';
let prizeDistributionApi='Activity/corona_backfeed';//抽中奖品之后发放奖品
let getChargingRecordApi='Money/user_log_list';
let getRechargeRecordApi='money/order_list';
let getChargeRepairCodeApi='Login/send_code';
let getChargeRepairSubmitApi='Scan/repair';
let recentChargeApi='Scan/lasterScan';//端口开启页面的接口，目的是获取用户最近的充电列表。
let repairInitApi='Scan/repairInit';//充电报修页面初始化接口，只是为了根据接口返回的字段决定用户需要前端验证几项
let repairInitTxtApi='Information/index';//充电报修页面第二个初始化接口调那么多接口不合理但是没办法让调就调，目的仅仅是为了获取单选按钮的文字（除了单选按钮的其它以外都是接口获取的）。
//member
let getComboListApi='Money/active_list';
let getHtmlApi='Agreement/vip_agreement';
let getCardHtmlApi='Agreement/month_agreement';
let getCardListApi='Card/card_list';
let getCouponListApi='Card/ticket_list';
let getCouponTypeApi='Card/types';
//pay
let getMemberRechargeApi='Card/vip_detail';
let checkPaymentSuccessApi='pay/check_pay';
let getCardDataApi='Card/card_detail';
let getRechargeDataApi='Money/money_pay_list';
//integral
let getIntegralListApi='Shop/goods_list';//获取积分列表
let getDetailListApi='Shop/integral_detail';//获取积分详细列表
let getIntegralRuleApi='Agreement/integral_agreement';//获取积分规则
let getNewUserApi='login/share_code';//邀请新用户页面数据
let getAddressListApi='shop/address';//获取地址列表
let modifyAddressApi='shop/choose_addr';//修改地址前的编辑
let deleteAddressApi='shop/delete_addr';//删除地址
let updateAddressApi='shop/creat_addr';//添加和编辑地址请求
let getIntegralDetailByIdApi='shop/goods_detail';//通过id获取积分详情数据
let exchangeIntegralApi='shop/buy_goods';//兑换积分 
let exchangeCodeApi='exchange/code';//兑换中心
let exchangeListApi='exchange/list';//兑换中心记录
//maintain
let InformationApi='Information/index';//报修选择具体情况返回 
let getorderApi='order/index';//订单列表 
let orderSubmitApi='Advise/submit';//提交订单数据 
// let is_feedbackApi='Money/feedback';//提交充值数据 
//miscellaneous
let getSettingListApi='Money/setup';//查询设置列表
let invoiceRecordApi='Invoice/index';//设置里的充电记录
let allRecordApi='Invoice/totalSelect';//开发票时获取全部的数据
let submitInvoiceApi='Invoice/headerSubmit';//提交开发票的数据
let getInvoiceApi='Invoice/headerList';//获取开发票的数据
// makeMoney
let getFangroupApi = 'fangroup/index'; // 获取赚钱中心首页数据
let getsignApi = 'fangroup/sign'; // 获取赚钱中心签到
let getTaskApi = 'Task/index'; // 视频看完调用接口
let getFangCashApi = 'fangroup/cash_index'; // 提现首页
let getCashApi = 'fangroup/cash'; // 提现首页
let getCashListApi = 'fangroup/cash_list'; // 提现列表
let getSign_popApi = 'fangroup/sign_pop'; // 签到弹窗
// webview
let getjindongApi = 'Pages/index'; // 京东一折
let getactiveApi = 'Pages/pages'; // 京东一折
let gethalfscreenApi = 'vip_plus/half_screen'; // 云闪付是否半屏

const install = (Vue, vm) => {
	//index
	let getCodeLogin = (params = {}) => vm.$u.get(codeLoginApi,params);
	let getIndexData = (params = {}) => vm.$u.post(indexDataApi,params);
	let getMapDetail = (params = {}) => vm.$u.post(getMapDetailApi,params);
	let getMapError = (params = {}) => vm.$u.post(getMapErrorApi,params);
	let getPaste = (params = {}) => vm.$u.post(getPasteApi,params);
	let getUser_info = (params = {}) => vm.$u.post(getUser_infoApi,params);
	let getLogin_replace = (params = {}) => vm.$u.post(getLogin_replaceApi,params);
	//charge
	let phoneAuthorization = (params = {}) => vm.$u.post(phoneAuthorizationApi,params);
	let getUserAgreement = (params = {}) => vm.$u.get(userAgreementApi,params);
	let getPortList = (params = {}) => vm.$u.post(portListApi,params);
	let portOpen = (params = {}) => vm.$u.post(portOpenApi,params);
	let getActivity = (params = {}) => vm.$u.post(getActivityApi,params);
	let getFullStopModal = (params = {}) => vm.$u.post(getFullStopModalApi,params);
	let getComboList = (params = {}) => vm.$u.post(getComboListApi,params);
	let getMemberRecharge = (params = {}) => vm.$u.post(getMemberRechargeApi,params);
	let getHtml = (params = {}) => vm.$u.post(getHtmlApi,params);
	let commonPay = (params = {}) => vm.$u.post(commonPayApi,params);
	let checkPaymentSuccess = (params = {}) => vm.$u.post(checkPaymentSuccessApi,params);
	let getCardData = (params = {}) => vm.$u.post(getCardDataApi,params);
	let getCardHtml = (params = {}) => vm.$u.post(getCardHtmlApi,params);
	let getRechargeData = (params = {}) => vm.$u.post(getRechargeDataApi,params);
	let startCharge = (params = {}) => vm.$u.post(startChargeApi,params);
	let getCountdown = (params = {}) => vm.$u.post(getCountdownApi,params);
	let endCharging = (params = {}) => vm.$u.post(endChargingApi,params);
	let prizeDistribution = (params = {}) => vm.$u.post(prizeDistributionApi,params);
	let getCardList = (params = {}) => vm.$u.post(getCardListApi,params);
	let getCouponList = (params = {}) => vm.$u.post(getCouponListApi,params);
	let getCouponType = (params = {}) => vm.$u.post(getCouponTypeApi,params);
	let getChargings = (params = {}) => vm.$u.post(getChargingApi,params);
	let getAward = (params = {}) => vm.$u.post(	getAwardApi,params);
	let getAccount = (params = {}) => vm.$u.post(getAccountApi,params);
	let getChargingRecord = (params = {}) => vm.$u.post(getChargingRecordApi,params);
	let getRechargeRecord = (params = {}) => vm.$u.post(getRechargeRecordApi,params);
	let getPersonalCenter = (params = {}) => vm.$u.post(getPersonalCenterApi,params);
	let getChargeRepairCode = (params = {}) => vm.$u.post(getChargeRepairCodeApi,params);
	let getChargeRepairSubmit = (params = {}) => vm.$u.post(getChargeRepairSubmitApi,params);
	let maintainRepair = (params = {}) => vm.$u.post(maintainRepairApi,params);
	let getEquipment = (params = {}) => vm.$u.post(getEquipmentApi,params);
	let getCodeActivity = (params = {}) => vm.$u.post(getCodeActivityApi,params);
	let getSignData = (params = {}) => vm.$u.post(getSignDataApi,params);
	let getGoSign = (params = {}) => vm.$u.post(getGoSignApi,params);
	let getSignRule = (params = {}) => vm.$u.post(getSignRuleApi,params);
	let signReceive = (params = {}) => vm.$u.post(signReceiveApi,params);
	let getSignPay = (params = {}) => vm.$u.post(getSignPayApi,params);
	let getSignCouponLook = (params = {}) => vm.$u.post(getSignCouponLookApi,params);
	let getIntegralList = (params = {}) => vm.$u.post(getIntegralListApi,params);
	let getDetailList = (params = {}) => vm.$u.post(getDetailListApi,params);
	let getIntegralRule = (params = {}) => vm.$u.post(getIntegralRuleApi,params);
	let getNewUser = (params = {}) => vm.$u.post(getNewUserApi,params);
	let getAddressList = (params = {}) => vm.$u.post(getAddressListApi,params);
	let modifyAddress = (params = {}) => vm.$u.post(modifyAddressApi,params);
	let deleteAddress = (params = {}) => vm.$u.post(deleteAddressApi,params);
	let updateAddress = (params = {}) => vm.$u.post(updateAddressApi,params);
	let getIntegralDetailById = (params = {}) => vm.$u.post(getIntegralDetailByIdApi,params);
	let exchangeIntegral = (params = {}) => vm.$u.post(exchangeIntegralApi,params);
	let exchangeCode = (params = {}) => vm.$u.post(exchangeCodeApi,params);
	let exchangeList = (params = {}) => vm.$u.post(exchangeListApi,params);
	let submitCommunication = (params = {}) => vm.$u.post(submitCommunicationApi,params);
	let invoiceRecord = (params = {}) => vm.$u.post(invoiceRecordApi,params);
	let allRecord = (params = {}) => vm.$u.post(allRecordApi,params);
	let submitInvoice = (params = {}) => vm.$u.post(submitInvoiceApi,params);
	let getInvoice = (params = {}) => vm.$u.post(getInvoiceApi,params);
	let loginOut = (params = {}) => vm.$u.post(loginOutApi,params);
	let getSettingList = (params = {}) => vm.$u.post(getSettingListApi,params);
	let getRecentCharge = (params = {}) => vm.$u.post(recentChargeApi,params);
	let getRepairInit = (params = {}) => vm.$u.post(repairInitApi,params);
	let setPopupCheckbox = (params = {}) => vm.$u.post(setPopupCheckboxApi,params);
	let getRepairInitTxt = (params = {}) => vm.$u.post(repairInitTxtApi,params);
	let isCountdown = (params = {}) => vm.$u.post(countdownApi,params);	
	let isBurstApi = (params = {}) => vm.$u.post(getBurstApi,params);	
	let getBurstscan = (params = {}) => vm.$u.post(getBurstscanApi,params);	
	let signinSet = (params = {}) => vm.$u.post(signinApi,params);	
	let getBurstStart = (params = {}) => vm.$u.post(getBurstStartApi,params);
	// makeMoney
	let getFangroup = (params = {}) => vm.$u.post(getFangroupApi,params);
	let getFangroupSign = (params = {}) => vm.$u.post(getsignApi,params);
	let getTask = (params = {}) => vm.$u.post(getTaskApi,params);
	let getFangCash = (params = {}) => vm.$u.post(getFangCashApi,params);
	let getCash = (params = {}) => vm.$u.post(getCashApi,params);
	let getCashList = (params = {}) => vm.$u.post(getCashListApi,params);
	let getSign_pop = (params = {}) => vm.$u.post(getSign_popApi,params);
	//maintain
	let Information = (params = {}) => vm.$u.post(InformationApi,params);
	let getorderList = (params = {}) => vm.$u.post(getorderApi,params);
	let orderSubmit = (params = {}) => vm.$u.post(orderSubmitApi,params);
	//webview
	let getjindong = (params = {}) => vm.$u.post(getjindongApi,params);
	let getactive = (params = {}) => vm.$u.post(getactiveApi,params);
	let gethalfscren = (params = {}) => vm.$u.post(gethalfscreenApi,params);
	
	/* let is_feedback = (params = {}) => vm.$u.post(is_feedbackApi,params); */
	vm.$u.api = {
		getCodeLogin,
		getIndexData,
		phoneAuthorization,
		getUserAgreement,
		getPortList,
		portOpen,
		getActivity,
		getFullStopModal,
		getComboList,
		getMemberRecharge,
		getHtml,
		commonPay,
		checkPaymentSuccess,
		getCardData,
		getCardHtml,
		getRechargeData,
		startCharge,
		getCountdown,
		endCharging,
		prizeDistribution,
		getCardList,
		getCouponList,
		getCouponType,
		getChargingRecord,
		getRechargeRecord,
		getPersonalCenter,
		getChargeRepairCode,
		getChargeRepairSubmit,
		maintainRepair,
		getEquipment,
		getCodeActivity,
		getMapDetail,
		getMapError,
		getSignData,
		getGoSign,
		getSignRule,
		signReceive,
		getSignPay,
		getSignCouponLook,
		getIntegralList,
		getDetailList,
		getIntegralRule,
		getNewUser,
		getAddressList,
		modifyAddress,
		deleteAddress,
		updateAddress,
		getIntegralDetailById,
		exchangeIntegral,
		exchangeCode,
		exchangeList,
		submitCommunication,
		invoiceRecord,
		allRecord,
		submitInvoice,
		getInvoice,
		loginOut,
		getSettingList,
		getRecentCharge,
		getRepairInit,
		setPopupCheckbox,
		getRepairInitTxt,
		getFangroup,
		getFangroupSign,
		getTask,
		getFangCash,
		getCash,
		getCashList,
		getSign_pop,
		getPaste,
		getUser_info,
		getLogin_replace,
		Information,
		getorderList,
		orderSubmit,
		getjindong,
		getactive,
		gethalfscren,
		isCountdown,
		getChargings,
		isBurstApi,
		getBurstStart,
		getAward,
		getBurstscan,
		getAccount,
		signinSet
	};
}

export default {
	install
}
